﻿@model ProductDetailsModel.AddToCartModel
@if (!Model.DisableWishlistButton)
{
    var addToWishlistText = "";
    if (!String.IsNullOrEmpty(Model.UpdatedShoppingCartItemId) && Model.UpdateShoppingCartItemType.HasValue && Model.UpdateShoppingCartItemType.Value == ShoppingCartType.Wishlist)
    {
        addToWishlistText = T("ShoppingCart.AddToWishlist.Update").Text;
    }
    else
    {
        addToWishlistText = T("ShoppingCart.AddToWishlist").Text;
    }

    <b-button variant="secondary" id="add-to-wishlist-button-@Model.ProductId" class="add-to-wishlist-button mr-1" data-productid="@Model.ProductId" onclick="AxiosCart.addproducttocart_details('@Url.RouteUrl("AddProductToCart-Details", new { productId = Model.ProductId, shoppingCartTypeId = (int)ShoppingCartType.Wishlist })', '#product-details-form');return false;" v-b-tooltip.hover.bottom title="@addToWishlistText">
        <span class="sr-only">@addToWishlistText</span>
        <b-icon icon="heart"></b-icon>
    </b-button>
}
